﻿@using Nop.Web.Models.Activity;
@model ActivityModel

@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";
}
<div class="page home-page">
    <div class="page-body">
        <div class="home-page-top clearfix">
            <div class="slide-show">
                @Html.Widget("home_page_top")
            </div>
            <div class="supper-deals">
                <a id="activity-url" href="@Url.GetBaseUrl("activities/"+Model.HomeVtickerCategoryUrl)" class="supper-deals-catalog">UP TO 70% OFF&nbsp;&nbsp;@Model.HomeVtickerCategoryName &gt;</a>
                <div id="supper-deals-container">
                    <span class="spinner">Supper Deals...</span>
                </div>
            </div>
            <script>
                seajs.use(["jquery", "vticker/1.0.0/index-debug"], function ($, vticker) {
                    $(function () {
                        var $ticker = $("#supper-deals-container");
                        function getProducts(data) {
                            if (data) {
                                $ticker.html(data.html);
                            } else {
                                $ticker.html('No available activity...');
                            }
                        };
                        $.ajax({
                            url: '@Url.GetBaseUrl(path: "activities/"+Model.HomeVtickerCategoryUrl+"/5")',
                            dataType: 'json',
                            type: 'GET'
                        }).done(function (data) {
                            getProducts(data);
                            vticker($ticker, {
                                speed: 700,
                                pause: 4000,
                                showItems: 1,
                                mousePause: true,
                                height: 0,
                                animate: true,
                                margin: 0,
                                padding: 0,
                                startPaused: false
                            });
                        });

                    });
                });
            </script>
        </div>
        <div class="home-page-bottom">
            @*@Html.Action("TopicBlock", "Topic", new { systemName = "HomePageText" })*@
            @*@Html.Action("HomepageCategories", "Catalog")*@
            @Html.Action("HomepageProducts", "Product", new { productThumbPictureSize = 238 })
            @*@Html.Action("HomePageNews", "News")*@
            @*@Html.Action("HomePagePolls", "Poll")*@
        </div>
        @Html.Widget("home_page_bottom")
    </div>
</div>
